﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>WashingMachine: WashingMachine Class Reference</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                WashingMachine: WashingMachine Class Reference
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">WashingMachine Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="WashingMachine" -->
<p><code>#include &lt;<a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a>&gt;</code></p>

<p><a href="class_washing_machine-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#ab1761ae76138d2a5b729977bc0e9fc93">WashingMachine</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a39eba5eb4c900c2e5de2ff5f9b0458f2">~WashingMachine</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#ac075b94319b14e20f02c79372321ee53">Process</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#ae0974e39ed7dd92139c1db1db4a6fb28">GetRtxCounter</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#abc3bd70a1feba9129c808baad9a418a1">Start</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#af6813e10ac1576e0b80ea5b2fc7c9144">WashingDone</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a1161edc0001019f90502548e8a5e6ed7">RinsingDone</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a39d7190eba16b68129da1d55cfa26761">SpinningDone</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a3fe9b3be5290f450adf539f869a2e9cd">Fault</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a7d3c6ac1bda9c64066591e5c2330b076">DiagnoseSuccess</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#acf07f915a9f72597e99bd29708da4a96">Print</a> (const string &amp;message)</td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WashingMachineContext &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WashingMachineContext *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#a744d531dac5842dc8037b65a94d03578">iRtxCount</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_washing_machine.html#ac3e7d15fe7a2dd8506c84c2a531866fe">iCounter</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_washing_machine_8h_source.html#l00013">13</a> of file <a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab1761ae76138d2a5b729977bc0e9fc93"></a><!-- doxytag: member="WashingMachine::WashingMachine" ref="ab1761ae76138d2a5b729977bc0e9fc93" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WashingMachine::WashingMachine </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00009">9</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a> = <span class="keyword">new</span> WashingMachineContext(*<span class="keyword">this</span>);
    <a class="code" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a>-&gt;SetObserver(fsm::ObserverStd::GetInstance());
    <a class="code" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a>-&gt;EnterInitialState();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a39eba5eb4c900c2e5de2ff5f9b0458f2"></a><!-- doxytag: member="WashingMachine::~WashingMachine" ref="a39eba5eb4c900c2e5de2ff5f9b0458f2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WashingMachine::~WashingMachine </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00016">16</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keyword">delete</span> <a class="code" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a>;
}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7d3c6ac1bda9c64066591e5c2330b076"></a><!-- doxytag: member="WashingMachine::DiagnoseSuccess" ref="a7d3c6ac1bda9c64066591e5c2330b076" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::DiagnoseSuccess </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00055">55</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a>().DiagnoseSuccess();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a3fe9b3be5290f450adf539f869a2e9cd"></a><!-- doxytag: member="WashingMachine::Fault" ref="a3fe9b3be5290f450adf539f869a2e9cd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::Fault </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00050">50</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a>().Fault();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a8359ff8fd49442b689789f855238da18"></a><!-- doxytag: member="WashingMachine::GetContext" ref="a8359ff8fd49442b689789f855238da18" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WashingMachineContext &amp; WashingMachine::GetContext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00021">21</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keywordflow">if</span>(<a class="code" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a> != NULL){
        <span class="keywordflow">return</span> *<a class="code" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">m_pContext</a>;
    } <span class="keywordflow">else</span> {
        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;context is not set&quot;</span>);
    }
}
</pre></div>
</div>
</div>
<a class="anchor" id="ae0974e39ed7dd92139c1db1db4a6fb28"></a><!-- doxytag: member="WashingMachine::GetRtxCounter" ref="ae0974e39ed7dd92139c1db1db4a6fb28" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int WashingMachine::GetRtxCounter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8h_source.html#l00023">23</a> of file <a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a>.</p>
<div class="fragment"><pre class="fragment">{<span class="keywordflow">return</span> <a class="code" href="class_washing_machine.html#a744d531dac5842dc8037b65a94d03578">iRtxCount</a>;}
</pre></div>
</div>
</div>
<a class="anchor" id="acf07f915a9f72597e99bd29708da4a96"></a><!-- doxytag: member="WashingMachine::Print" ref="acf07f915a9f72597e99bd29708da4a96" args="(const string &amp;message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::Print </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00060">60</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    cout &lt;&lt; message &lt;&lt; endl;
}
</pre></div>
</div>
</div>
<a class="anchor" id="ac075b94319b14e20f02c79372321ee53"></a><!-- doxytag: member="WashingMachine::Process" ref="ac075b94319b14e20f02c79372321ee53" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::Process </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a1161edc0001019f90502548e8a5e6ed7"></a><!-- doxytag: member="WashingMachine::RinsingDone" ref="a1161edc0001019f90502548e8a5e6ed7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::RinsingDone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00040">40</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a>().RinsingDone();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a39d7190eba16b68129da1d55cfa26761"></a><!-- doxytag: member="WashingMachine::SpinningDone" ref="a39d7190eba16b68129da1d55cfa26761" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::SpinningDone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00045">45</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a>().SpinningDone();
}
</pre></div>
</div>
</div>
<a class="anchor" id="abc3bd70a1feba9129c808baad9a418a1"></a><!-- doxytag: member="WashingMachine::Start" ref="abc3bd70a1feba9129c808baad9a418a1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::Start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00030">30</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a>().Start();
}
</pre></div>
</div>
</div>
<a class="anchor" id="af6813e10ac1576e0b80ea5b2fc7c9144"></a><!-- doxytag: member="WashingMachine::WashingDone" ref="af6813e10ac1576e0b80ea5b2fc7c9144" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void WashingMachine::WashingDone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8cpp_source.html#l00035">35</a> of file <a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_washing_machine.html#a8359ff8fd49442b689789f855238da18">GetContext</a>().WashingDone();
}
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ac3e7d15fe7a2dd8506c84c2a531866fe"></a><!-- doxytag: member="WashingMachine::iCounter" ref="ac3e7d15fe7a2dd8506c84c2a531866fe" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_washing_machine.html#ac3e7d15fe7a2dd8506c84c2a531866fe">WashingMachine::iCounter</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8h_source.html#l00041">41</a> of file <a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a>.</p>

</div>
</div>
<a class="anchor" id="a744d531dac5842dc8037b65a94d03578"></a><!-- doxytag: member="WashingMachine::iRtxCount" ref="a744d531dac5842dc8037b65a94d03578" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_washing_machine.html#a744d531dac5842dc8037b65a94d03578">WashingMachine::iRtxCount</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8h_source.html#l00040">40</a> of file <a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae4d672f46f257688a32dfea8ef1bfa24"></a><!-- doxytag: member="WashingMachine::m_pContext" ref="ae4d672f46f257688a32dfea8ef1bfa24" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">WashingMachineContext* <a class="el" href="class_washing_machine.html#ae4d672f46f257688a32dfea8ef1bfa24">WashingMachine::m_pContext</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_washing_machine_8h_source.html#l00039">39</a> of file <a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_washing_machine_8h_source.html">WashingMachine.h</a></li>
<li><a class="el" href="_washing_machine_8cpp_source.html">WashingMachine.cpp</a></li>
</ul>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
